home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / FROMUTS / CDUNGEON / !CDUNGEON / c / BALLOP < prev    next >
Text File  |  1991-05-20  |  3KB  |  139 lines

  1. /* BALLOP-    BALLOON FUNCTION */
  2.  
  3. /*COPYRIGHT 1980, INFOCOM COMPUTERS AND COMMUNICATIONS, CAMBRIDGE MA. 02142*/
  4. /* ALL RIGHTS RESERVED, COMMERCIAL USAGE STRICTLY PROHIBITED */
  5. /* WRITTEN BY R. M. SUPNIK */
  6.  
  7. #include "funcs.h"
  8. #include "vars.h"
  9.  
  10. logical ballop_(arg)
  11. integer arg;
  12. {
  13.     /* System generated locals */
  14.     logical ret_val;
  15.  
  16.     ret_val = TRUE_;
  17. /*                         !ASSUME WINS. */
  18.     if (arg != 2) {
  19.     goto L200;
  20.     }
  21. /*                         !READOUT? */
  22.     if (prsvec_1.prsa != vindex_1.lookw) {
  23.     goto L10;
  24.     }
  25. /*                         !ONLY PROCESS LOOK. */
  26.     if (findex_1.binff != 0) {
  27.     goto L50;
  28.     }
  29. /*                         !INFLATED? */
  30.     rspeak_(543);
  31. /*                         !NO. */
  32.     goto L100;
  33. L50:
  34.     rspsub_(544, objcts_1.odesc2[findex_1.binff - 1]);
  35. /*                         !YES. */
  36. L100:
  37.     if (findex_1.btief != 0) {
  38.     rspeak_(545);
  39.     }
  40. /*                         !HOOKED? */
  41.     return ret_val;
  42.  
  43. L200:
  44.     if (arg != 1) {
  45.     goto L500;
  46.     }
  47. /*                         !READIN? */
  48.     if (prsvec_1.prsa != vindex_1.walkw) {
  49.     goto L300;
  50.     }
  51. /*                         !WALK? */
  52.     if (findxt_(prsvec_1.prso, play_1.here)) {
  53.     goto L250;
  54.     }
  55. /*                         !VALID EXIT? */
  56.     rspeak_(546);
  57. /*                         !NO, JOKE. */
  58.     return ret_val;
  59.  
  60. L250:
  61.     if (findex_1.btief == 0) {
  62.     goto L275;
  63.     }
  64. /*                         !TIED UP? */
  65.     rspeak_(547);
  66. /*                         !YES, JOKE. */
  67.     return ret_val;
  68.  
  69. L275:
  70.     if (curxt_1.xtype != xpars_1.xnorm) {
  71.     goto L10;
  72.     }
  73. /*                         !NORMAL EXIT? */
  74.     if ((rooms_1.rflag[curxt_1.xroom1 - 1] & RMUNG) == 0) {
  75.     state_1.bloc = curxt_1.xroom1;
  76.     }
  77. L10:
  78.     ret_val = FALSE_;
  79.     return ret_val;
  80.  
  81. L300:
  82.     if (prsvec_1.prsa != vindex_1.takew || prsvec_1.prso != findex_1.binff) {
  83.     goto L350;
  84.     }
  85.     rspsub_(548, objcts_1.odesc2[findex_1.binff - 1]);
  86. /*                         !RECEP CONT TOO HOT. */
  87.     return ret_val;
  88.  
  89. L350:
  90.     if (prsvec_1.prsa != vindex_1.putw || prsvec_1.prsi != oindex_1.recep || 
  91.         qempty_(oindex_1.recep)) {
  92.     goto L10;
  93.     }
  94.     rspeak_(549);
  95.     return ret_val;
  96.  
  97. L500:
  98.     if (prsvec_1.prsa != vindex_1.unboaw || (rooms_1.rflag[play_1.here - 1] & 
  99.         RLAND) == 0) {
  100.     goto L600;
  101.     }
  102.     if (findex_1.binff != 0) {
  103.     cevent_1.ctick[cindex_1.cevbal - 1] = 3;
  104.     }
  105. /*                         !HE GOT OUT, START BALLOON. */
  106.     goto L10;
  107.  
  108. L600:
  109.     if (prsvec_1.prsa != vindex_1.burnw || objcts_1.ocan[prsvec_1.prso - 1] !=
  110.          oindex_1.recep) {
  111.     goto L700;
  112.     }
  113.     rspsub_(550, objcts_1.odesc2[prsvec_1.prso - 1]);
  114. /*                         !LIGHT FIRE IN RECEP. */
  115.     cevent_1.ctick[cindex_1.cevbrn - 1] = objcts_1.osize[prsvec_1.prso - 1] * 
  116.         20;
  117.     objcts_1.oflag1[prsvec_1.prso - 1] |= ONBT + FLAMBT + 
  118.         LITEBT & ~ (TAKEBT + READBT);
  119.     if (findex_1.binff != 0) {
  120.     return ret_val;
  121.     }
  122.     if (! findex_1.blabf) {
  123.     newsta_(oindex_1.blabe, 0, 0, oindex_1.ballo, 0);
  124.     }
  125.     findex_1.blabf = TRUE_;
  126.     findex_1.binff = prsvec_1.prso;
  127.     cevent_1.ctick[cindex_1.cevbal - 1] = 3;
  128.     rspeak_(551);
  129.     return ret_val;
  130.  
  131. L700:
  132.     if (prsvec_1.prsa == vindex_1.unboaw && findex_1.binff != 0 && (
  133.         rooms_1.rflag[play_1.here - 1] & RLAND) != 0) {
  134.     cevent_1.ctick[cindex_1.cevbal - 1] = 3;
  135.     }
  136.     goto L10;
  137.  
  138. } /* ballop_ */
  139.